"""
Forms and validation code for user registration.

"""


from django import forms
#from django.core.validators import alnum_re
#from django.utils.translation import ugettext_lazy as _
#from django.contrib.auth.models import User

attrs_dict = { 'class': 'required' }

"""
CREATE TABLE auth_user
(
  id serial NOT NULL,
  username character varying(30) NOT NULL,
  first_name character varying(30) NOT NULL,
  last_name character varying(30) NOT NULL,
  email character varying(75) NOT NULL,
  "password" character varying(128) NOT NULL,
  is_staff boolean NOT NULL,
  is_active boolean NOT NULL,
  is_superuser boolean NOT NULL,
  last_login timestamp with time zone NOT NULL,
  date_joined timestamp with time zone NOT NULL,
"""
class RegistrationForm(forms.Form):
    username = forms.CharField(max_length=30)
    email = forms.EmailField()
    password1 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict, render_value=False),
                                label='lpassword1')
    password2 = forms.CharField(widget=forms.PasswordInput(attrs=attrs_dict, render_value=False),
                                label='lpassword2')
    first_name = forms.CharField(max_length=30)
    last_name = forms.CharField(max_length=30)
    estado = forms.CharField(max_length=30)
    direccion = forms.CharField(max_length=30)
    ciudad = forms.CharField(max_length=30)
    codigo_postal = forms.CharField(max_length=12)
    telefono = forms.CharField(max_length=30)
    tarjeta_tipo = forms.CharField(max_length=30)
    tarjeta_numero = forms.CharField(max_length=30)
    tarjeta_fecha_exp = forms.CharField(max_length=30)
    
"""
CREATE TABLE shop_cliente
(
  persona_ptr_id integer NOT NULL,
  estado character varying(100) NOT NULL,
  direccion character varying(100) NOT NULL,
  ciudad character varying(100) NOT NULL,
  codigo_postal character varying(5) NOT NULL,
  telefono character varying(20) NOT NULL,
  tarjeta_tipo character varying(1) NOT NULL,
  tarjeta_numero character varying(16) NOT NULL,
  tarjeta_fecha_exp date NOT NULL,
  """



